package com.quanquan.user.repository;

import com.quanquan.user.entity.UserLevel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 功能描述:user  Dao层
 *
 * @ClassName: UserRepository
 * @Author: xiaoqianh丶
 * @Date: 2019-03-11 15:08
 * @Version: V1.0
 */
@Repository
public interface UserLevelRepository extends JpaRepository<UserLevel, String>, JpaSpecificationExecutor<UserLevel> {

    public UserLevel findUserLevelByIdAndRemove(String userLevelId ,Integer remove);


    /**
     * 根据会员等级层级关系查询会员等级
     * @param levelStratum
     * @param remove
     * @return
     */
    public UserLevel findUserLevelByLevelStratumAndRemove(Integer levelStratum ,Integer remove);


    /**
     *
     * @param remove
     * @return
     */
    public List<UserLevel> findAllByRemoveOrderByLevelStratumDesc(Integer remove);



}
